package sctu.edu.java.year2016.team03.liyouhong.day20160521.chapter5_2;

/**
 * Created by Administrator on 2016/5/21 0021.
 * 2.编写java程序，创建一维数组arrp[]，将数组中最大的数输出.
 * */
public class Arraymax {
    public static void main(String[] args) {
        int[] arrmax=new int[]{9,5,6,56,5,5};
        int max=arrmax[0];
        for(int i=1;i<arrmax.length;i++) {
            if (max < arrmax[i])
                max=arrmax[i];
        }
        System.out.println("数组arrmax最大值为："+max);
    }
}
